home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
TextCommon.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
41KB
|
1,124 lines
/*
File: TextCommon.h
Contains: Definitions for common text types, values for them, and related routines
Version: Technology: System 8
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __TEXTCOMMON__
#define __TEXTCOMMON__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
/*
LocaleLanguageCodes are derived from the alpha-3 character codes
in ISO 639. (see comment below)
LocaleRegionCodes are derived from the alpha-2 codes in ISO 1399.
(see comment below)
Apple does not maintain the contents of these lists. For that
we rely on ISO. Additionally, Apple will not attempt to create an enumerated
type containing the ISO language and territory codes. Instead this file
contains two very long comments containing all the codes we know of at this
point in time (Nov. 1995). To obtain the most up to date list you will
need to contact ISO.
LocaleLanguageCode and LocaleRegionCodes along with LocaleCustomizationCodes
are used to create LocaleIdentifiers. LocaleIdentifiers are packed
32-bit combinations of language and region information that can be
used to tag international data.
To create a LocaleIdentifiers find the language you are interested in
see the long comment labeled "ISO CD 639-2 Language Codes."
Next find the two character code that matches the territory/region you
are interested in. These are located in the comment labeled
"Codes from ISO 3166."
This can then be passed to the function CreateLocaleIdentifier like
this:
CreateLocaleIdentifier(
'eng', //english
'AU', //Australian
0
)
In some cases there is more than one alpha-3 symbol for a given
language. Although, you can certainly create a LocaleIdentifier
from any of these symbols Apple has chosen preferred symbols which
will be used in Apple's localizations. Where there are more than
one alpha-3 language symbol for a given language the preferred symbol
is the first one in the list. The second item in the list gives
both of the ISO codes.
i.e.
sqi Albanian
alb/sqi Albanian
*/
typedef UInt32 LocaleIdentifier;
/* Create correctly spelled versions of kSystemDefaultLocaleIdentifer and */
/* kUserDefaultLocaleIdentifer. Leave the misspelled symbols in so nobody breaks. */
enum {
kLocaleIdentifierWildCard = 0x00000000,
kSystemDefaultLocaleIdentifer = 0x7FFFFFFF,
kSystemDefaultLocaleIdentifier = 0x7FFFFFFF,
kUserDefaultLocaleIdentifer = 0x7EEEEEEE,
kUserDefaultLocaleIdentifier = 0x7EEEEEEE
};
typedef OSType LocaleLanguageCode;
enum {
kLocaleLanguageWildCard = 0x00000000
};
typedef UInt16 LocaleRegionCode;
typedef UInt16 LocaleCustomizationCode;
enum {
kLocaleRegionWildCard = 0x0000,
kLocaleCustomizationWildCard = 0x0000
};
/* TextEncodingBase type & values */
/* (values 0-32 correspond to the Script Codes defined in Inside Macintosh: Text pages 6-52 and 6-53 */
typedef UInt32 TextEncodingBase;
enum {
/* Mac OS encodings*/
kTextEncodingMacRoman = 0L,
kTextEncodingMacJapanese = 1L,
kTextEncodingMacTradChinese = 2L,
kTextEncodingMacKorean = 3L,
kTextEncodingMacArabic = 4L,
kTextEncodingMacHebrew = 5L,
kTextEncodingMacGreek = 6L,
kTextEncodingMacCyrillic = 7L,
kTextEncodingMacRSymbol = 8L,
kTextEncodingMacDevanagari = 9L,
kTextEncodingMacGurmukhi = 10L,
kTextEncodingMacGujarati = 11L,
kTextEncodingMacOriya = 12L,
kTextEncodingMacBengali = 13L,
kTextEncodingMacTamil = 14L,
kTextEncodingMacTelugu = 15L,
kTextEncodingMacKannada = 16L,
kTextEncodingMacMalayalam = 17L,
kTextEncodingMacSinhalese = 18L,
kTextEncodingMacBurmese = 19L,
kTextEncodingMacKhmer = 20L,
kTextEncodingMacThai = 21L,
kTextEncodingMacLaotian = 22L,
kTextEncodingMacGeorgian = 23L,
kTextEncodingMacArmenian = 24L,
kTextEncodingMacSimpChinese = 25L,
kTextEncodingMacTibetan = 26L,
kTextEncodingMacMongolian = 27L,
kTextEncodingMacGeez = 28L,
kTextEncodingMacEastEurRoman = 29,
kTextEncodingMacCentralEurRoman = 29,
kTextEncodingMacVietnamese = 30,
kTextEncodingMacExtArabic = 31,
kTextEncodingMacUninterp = 32,
kTextEncodingMacSymbol = 33,
kTextEncodingMacDingbats = 34,
kTextEncodingMacTurkish = 35,
kTextEncodingMacCroatian = 36,
kTextEncodingMacIcelandic = 37,
kTextEncodingMacRomanian = 38,
kTextEncodingMacUkrainian = 152,
kTextEncodingMacBulgarian = 153,
kTextEncodingMacHFS = 0xFF, /* Meta-value, should never appear in a table.*/
/* Unicode & ISO UCS encodings begin at 0x100*/
kTextEncodingUnicodeDefault = 0x0100, /* Meta-value, should never appear in a table.*/
kTextEncodingUnicodeV1_1 = 0x0101,
kTextEncodingISO10646_1993 = 0x0102, /* can have UCS4 format (Unicode can't)*/
/* ISO 8-bit and 7-bit encodings begin at 0x200*/
kTextEncodingISOLatin1 = 0x0201, /* ISO 8859-1*/
kTextEncodingISOLatin2 = 0x0202, /* ISO 8859-2*/
kTextEncodingISOLatinCyrillic = 0x0205, /* ISO 8859-5*/
kTextEncodingISOLatinArabic = 0x0206, /* ISO 8859-6, = ASMO 708, =DOS CP 708*/
kTextEncodingISOLatinGreek = 0x0207, /* ISO 8859-7*/
kTextEncodingISOLatinHebrew = 0x0208, /* ISO 8859-8*/
kTextEncodingISOLatin5 = 0x0209, /* ISO 8859-9*/
/* MS-DOS & Windows encodings begin at 0x400*/
kTextEncodingDOSLatinUS = 0x0400, /* code page 437*/
kTextEncodingDOSGreek = 0x0405, /* code page 737 (formerly code page 437G)*/
kTextEncodingDOSBalticRim = 0x0406, /* code page 775*/
kTextEncodingDOSLatin1 = 0x0410, /* code page 850, "Multilingual"*/
kTextEncodingDOSGreek1 = 0x0411, /* code page 851*/
kTextEncodingDOSLatin2 = 0x0412, /* code page 852, Slavic*/
kTextEncodingDOSCyrillic = 0x0413, /* code page 855, IBM Cyrillic*/
kTextEncodingDOSTurkish = 0x0414, /* code page 857, IBM Turkish*/
kTextEncodingDOSPortuguese = 0x0415, /* code page 860*/
kTextEncodingDOSIcelandic = 0x0416, /* code page 861*/
kTextEncodingDOSHebrew = 0x0417, /* code page 862*/
kTextEncodingDOSCanadianFrench = 0x0418, /* code page 863*/
kTextEncodingDOSArabic = 0x0419, /* code page 864*/
kTextEncodingDOSNordic = 0x041A, /* code page 865*/
kTextEncodingDOSRussian = 0x041B, /* code page 866*/
kTextEncodingDOSGreek2 = 0x041C, /* code page 869, IBM Modern Greek*/
kTextEncodingDOSThai = 0x041D, /* code page 874, also used for Windows*/
kTextEncodingDOSJapanese = 0x0420, /* code page 932, also used for Windows*/
kTextEncodingDOSChineseSimplif = 0x0421, /* code page 936, also used for Windows*/
kTextEncodingDOSKorean = 0x0422, /* code page 949, also used for Windows*/
kTextEncodingDOSChineseTrad = 0x0423, /* code page 950, also used for Windows*/
kTextEncodingWindowsLatin1 = 0x0500, /* code page 1252*/
kTextEncodingWindowsANSI = 0x0500, /* code page 1252 (alternate name)*/
kTextEncodingWindowsLatin2 = 0x0501, /* code page 1250, Central Europe*/
kTextEncodingWindowsCyrillic = 0x0502, /* code page 1251, Slavic Cyrillic*/
kTextEncodingWindowsGreek = 0x0503, /* code page 1253*/
kTextEncodingWindowsLatin5 = 0x0504, /* code page 1254, Turkish*/
kTextEncodingWindowsHebrew = 0x0505, /* code page 1255*/
kTextEncodingWindowsArabic = 0x0506, /* code page 1256*/
kTextEncodingWindowsBalticRim = 0x0507, /* code page 1257*/
/* Various national standards begin at 0x600*/
kTextEncodingUS_ASCII = 0x0600,
kTextEncodingJIS_X0201_76 = 0x0620,
kTextEncodingJIS_X0208_83 = 0x0621,
kTextEncodingJIS_X0208_90 = 0x0622,
kTextEncodingJIS_X0212_90 = 0x0623,
kTextEncodingGB_2312_80 = 0x0630,
kTextEncodingKSC_5601_87 = 0x0640, /* ISO 2022 collections begin at 0x800*/
kTextEncodingISO_2022_JP = 0x0820,
kTextEncodingISO_2022_JP_2 = 0x0821,
kTextEncodingISO_2022_KR = 0x0840, /* EUC collections begin at 0x900*/
kTextEncodingEUC_JP = 0x0920,
kTextEncodingEUC_KR = 0x0940, /* Other defacto standards begin at 0xA00*/
kTextEncodingShiftJIS = 0x0A01, /* plain Shift-JIS*/
kTextEncodingKOI8_R = 0x0A02 /* Russian internet standard*/
};
/* TextEncodingVariant type & values */
typedef UInt32 TextEncodingVariant;
enum {
/* Default TextEncodingVariant, for any TextEncodingBase*/
kTextEncodingDefaultVariant = 0, /* Variants of kTextEncodingMacJapanese*/
kJapaneseStandardVariant = 0,
kJapaneseStdNoVerticalsVariant = 1,
kJapaneseBasicVariant = 2,
kJapanesePostScriptScrnVariant = 3,
kJapanesePostScriptPrintVariant = 4,
kJapaneseVertAtKuPlusTenVariant = 5, /* Variants of kTextEncodingMacHebrew*/
kHebrewStandardVariant = 0,
kHebrewFigureSpaceVariant = 1, /* Variants of kTextEncodingUnicodeV1_1*/
kUnicodeNoSubset = 0,
kUnicodeNoCompatibilityVariant = 1,
kUnicodeMaxDecomposedVariant = 2,
kUnicodeNoComposedVariant = 3
};
/* TextEncodingFormat type & values */
typedef UInt32 TextEncodingFormat;
enum {
/* Default TextEncodingFormat for Any TextEncodingBase*/
kTextEncodingDefaultFormat = 0, /* Formats for kTextEncodingUnicodeV1_1*/
kUnicode16BitFormat = 0,
kUnicodeUTF7Format = 1,
kUnicodeUTF8Format = 2, /* Formats for kTextEncodingISO10646_1993*/
kISO10646UCS2Format = 0
};
/* TextEncoding type */
typedef UInt32 TextEncoding;
/* enums for TextEncoding Conversion routines */
enum {
kTextScriptDontCare = -128,
kTextLanguageDontCare = -128,
kTextRegionDontCare = -128
};
/* Character Group and Class */
typedef UInt8 CharacterGroup;
enum {
kCharGroupAny = 0, /* wildcard*/
kCharGroupControl = 1,
kCharGroupCommon = 2,
kCharGroupRomanNumeral = 4,
kCharGroupLatin = 8,
kCharGroupGreek = 9,
kCharGroupCyrillic = 10,
kCharGroupArmenian = 11,
kCharGroupHebrew = 12,
kCharGroupArabic = 13,
kCharGroupIndicCommon = 14,
kCharGroupDevanagari = 15,
kCharGroupBengali = 16,
kCharGroupGurmukhi = 17,
kCharGroupGujarati = 18,
kCharGroupOriya = 19,
kCharGroupTamil = 20,
kCharGroupTelugu = 21,
kCharGroupKannada = 22,
kCharGroupMalayalam = 23,
kCharGroupSinhala = 24,
kCharGroupThai = 25,
kCharGroupLao = 26,
kCharGroupBurmese = 27,
kCharGroupKhmer = 28,
kCharGroupTibetan = 29,
kCharGroupMongolian = 30,
kCharGroupGeorgian = 31,
kCharGroupEthiopic = 32,
kCharGroupCJKCommon = 48,
kCharGroupJapaneseCommon = 49,
kCharGroupKanaCommon = 50,
kCharGroupHiragana = 51,
kCharGroupKatakana = 52,
kCharGroupBopomofo = 53,
kCharGroupJamoHangul = 54,
kCharGroupCJKIdeograph = 55,
kCharGroupUserDefined = 62
};
typedef UInt8 CharacterSubgroup;
typedef UInt8 CharacterClass;
enum {
kCharClassAny = 0, /* wildcard*/
kCharClassLetter = 1,
kCharClassNumber = 2,
kCharClassSeparator = 3,
kCharClassPunctuation = 4,
kCharClassSymbol = 5,
kCharClassControl = 6,
kCharClassUndefined = 7
};
typedef UInt8 CharacterSubclass;
/* subclass wildcard for all classes*/
enum {
kCharSubclassAny = 0
};
/* subclasses for class letter*/
enum {
kCharSubclassLetterBasic = 1,
kCharSubclassLetterModifier = 2,
kCharSubclassLetterCombining = 3,
kCharSubclassLetterWordAbbrev = 4
};
/* subclasses for class number*/
enum {
kCharSubclassNumberBasic = 1,
kCharSubclassNumberFraction = 2
};
/* subclasses for class separator*/
enum {
kCharSubclassSeparatorSpace = 1,
kCharSubclassSeparatorNoBreak = 2,
kCharSubclassSeparatorTab = 3,
kCharSubclassSeparatorLineBreak = 4
};
/* subclasses for class symbol*/
enum {
kCharSubclassSymbolOther = 1,
kCharSubclassSymbolMath = 2,
kCharSubclassSymbolCurrency = 3,
kCharSubclassSymbolCombining = 4
};
typedef UInt16 CharacterSubclassMask;
enum {
kCharLetterBasicMask = 1 << kCharSubclassLetterBasic,
kCharLetterModifierMask = 1 << kCharSubclassLetterModifier,
kCharLetterCombiningMask = 1 << kCharSubclassLetterCombining,
kCharLetterWordAbbrevMask = 1 << kCharSubclassLetterWordAbbrev,
kCharNumberBasicMask = 1 << kCharSubclassNumberBasic,
kCharNumberFractionMask = 1 << kCharSubclassNumberFraction,
kCharSeparatorSpaceMask = 1 << kCharSubclassSeparatorSpace,
kCharSeparatorNoBreakMask = 1 << kCharSubclassSeparatorNoBreak,
kCharSeparatorTabMask = 1 << kCharSubclassSeparatorTab,
kCharSeparatorLineBreakMask = 1 << kCharSubclassSeparatorLineBreak,
kCharSymbolOtherMask = 1 << kCharSubclassSymbolOther,
kCharSymbolMathMask = 1 << kCharSubclassSymbolMath,
kCharSymbolCurrencyMask = 1 << kCharSubclassSymbolCurrency
};
/* Prototypes for LocaleIdentifier functions */
extern LocaleIdentifier CreateLocaleIdentifier(LocaleLanguageCode language, LocaleRegionCode region, LocaleCustomizationCode customization);
extern LocaleLanguageCode GetLocaleLanguage(LocaleIdentifier identifier);
extern LocaleRegionCode GetLocaleRegion(LocaleIdentifier identifier);
extern LocaleCustomizationCode GetLocaleCustomization(LocaleIdentifier identifier);
/* Prototypes for TextEncoding functions */
extern pascal TextEncoding CreateTextEncoding(TextEncodingBase encodingBase, TextEncodingVariant encodingVariant, TextEncodingFormat encodingFormat)
THREEWORDINLINE(0x303C, 0x0615, 0xABCE);
extern pascal TextEncodingBase GetTextEncodingBase(TextEncoding encoding)
THREEWORDINLINE(0x303C, 0x0216, 0xABCE);
extern pascal TextEncodingVariant GetTextEncodingVariant(TextEncoding encoding)
THREEWORDINLINE(0x303C, 0x0217, 0xABCE);
extern pascal TextEncodingFormat GetTextEncodingFormat(TextEncoding encoding)
THREEWORDINLINE(0x303C, 0x0218, 0xABCE);
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
extern pascal OSStatus UpgradeScriptInfoToTextEncoding(ScriptCode textScriptID, LangCode textLanguageID, RegionCode regionID, ConstStr255Param textFontname, TextEncoding *encoding)
THREEWORDINLINE(0x303C, 0x0710, 0xABCE);
extern pascal OSStatus RevertTextEncodingToScriptInfo(TextEncoding encoding, ScriptCode *textScriptID, LangCode *textLanguageID, Str255 textFontname)
THREEWORDINLINE(0x303C, 0x0811, 0xABCE);
#endif
#if FOR_SYSTEM8_COOPERATIVE
extern OSStatus UpgradeScriptInfoToLocaleIdentifier(ScriptCode script, LangCode language, RegionCode region, ConstStr255Param fontName, LocaleIdentifier *identifier);
extern OSStatus RevertLocaleIdentifierToScriptInfo(LocaleIdentifier identifier, ScriptCode *script, LangCode *language, Str255 fontName);
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
typedef FourCharCode CharPropertyType;
enum {
kCharPropertyTypeFlags = 'flag',
kCharPropertyTypeClass = 'clas',
kCharPropertyTypeGroup = 'grup',
kCharPropertyTypeDirection = 'dirc',
kCharPropertyTypeReorderPri = 'reor',
kCharPropertyTypeToken = 'tokn',
kCharPropertyTypeCtypes = 'ctyp'
};
typedef UInt32 CharPropertyValue;
extern OSStatus GetCharacterProperties(BytePtr charPtr, TextEncoding encoding, ItemCount propertyCount, CharPropertyType typeList[], CharPropertyValue valueList[]);
#endif
/*
----------------------------------------------------------------------------
ISO CD 639-2 Language Codes
----------------------------------------------------------------------------
This is a extract of a paper called ISO CD 639/2 Draft Proposal, titled
"Code for the representation of names of languages, alpha-3 code" dated
12/16/91.
* Typed in by Keld.Simonsen@dkuug.dk 1993-11-11
Table 3
Alpha-3 symbols arranged alphabetically by symbol
Symbol Language name
abk Abkhazian
ace Achinese
ach Acoli
ada Adangme
aar Afar
afr Africaans
afh Afrihili
afa Afro-Asiatic (Other)
aka Akan
akk Akkadian
sqi Albanian
alb/sqi Albanian
ale Aleut
alg Algonquian languages
ajm Aljamia
tut Altaic (Other)
amh Amharic
apa Apache languages
ara Arabic
arc Aramaic
arp Arapaho
arn Araucanian
arw Arawak
hye Armenian
hye/arm Armenian
art Artificial (Other)
asm Assamese
ath Athapascan languages
map Austronesian (Other)
ava Avaric
ave Avestan
awa Awandhi
aym Aymara
aze Azerbaijani
nah Aztec
ban Balinese
bat Baltic (Other)
bal Baluchi
bam Bambara
bai Bamileke languages
bad Banda
bas Basa
bak Bashkir
eus Basque
baq/eus Basque
bej Beja
bem Bemba
ben Bengali
ber Berber languages
bho Bhojpuri
bih Bihari
bik Bikol
bin Bini
bis Bislama
bra Braj
bre Breton
bug Buginese
bul Bulgarian
mya Burmese
bur/mya Burmese
bel Byelorussian
cad Caddo
car Carib
cat Catalan
cau Caucasian (Other)
ceb Cebuano
cel Celtic (Other)
cai Central American Indian (Other)
chg Chagatai
cha Chamorro
che Chechen
chr Cherokee
chy Cheyenne
chb Chibcha
zho Chinese
zho/chi Chinese
chn Chinook jargon
cho Choctaw
chu Church Slavic
chv Chuvash
cop Coptic
cor Cornish
cos Corsican
cre Cree
mus Creek
cpe Creoles and pidgins, English-based (Other)
crp Creoles and pidgins (Other)
cpp Creoles and pidgins, Portuguese-based (Other)
cpf Creoles and pidgins, French-based (Other)
cus Cushitic (Other)
ces Czech
ces/cze Czeck
dak Dakota
dan Danish
del Delaware
din Dinka
doi Dogri
dra Dravidian (Other)
dua Duala
nld Dutch
dut/nld Dutch
dum Dutch, Middle (ca. 1050-1350)
dyu Dyula
dzo Dzongkha
efi Efik
egy Egyptian (Ancient)
eka Ekajuk
elx Elamite
eng English
enm English, Middle (1100-1500)
ang English, Old (ca. 450-1100)
esk Eskimo (Other)
epo Esperanto
est Estonian
eth Ethiopic
ewe Ewe
ewo Ewondo
fan Fang
fat Fanti
fao Faroese
fij Fijian
fin Finnish
fiu Finno-Ugrian (Other)
fon Fon
fra French
fra/fre French
fro French, Old (ca. 842-1400)
frm French, Middel (ca. 1400-1600)
fry Friesian
ful Fulah
gaa Ga
gdh Gaelic (Scots)
gdh/gae Gaelic (Scots)
glg Gallegan
lug Ganda
gay Gayo
kat Georgian
geo/kat Georgian
deu German
ger/deu German
goh German, Old High (ca. 750-1050)
gmh German, Middle High (ca. 1050-1500)
gem Germanic (Other)
gil Gilbertese
gon Gondi
got Gothic
grb Grebo
ell Greek, Modern (1453- )
gre/ell Greek, Modern (1453- )
grc Greek, Ancient (to 1453)
kal Greenlandic
grn Guarani
guj Gujarati
hai Haida
hau Hausa
haw Hawaiian
heb Hebrew
her Herero
hil Hiligaynon
him Himachali
hin Hindi
hmo Hiri Motu
hun Hungarian
hup Hupa
iba Iban
isl Icelandic
ice/isl Icelandic
ibo Igbo
ijo Ijo
ilo Iloko
inc Indic (Other)
ine Indo-European (Other)
ind Indonesian
ina Interlingua (International Auxilary Language Association)
ile Interlingue
iku Inuktitut
ipk Inupiak
ira Iranian (Other)
gai Irish
iri/gai Irish
iro Iroquoian languages
ita Italian
jpn Japanese
jaw Javanese
jav/jaw Javanese
jrb Judeo-Arabic
jpr Judeo-Persian
kab Kabyle
kac Kachin
kam Kamba
kan Kannada
kau Kanuri
kaa Kara-Kalpak
kar Karen
kas Kashmiri
kaw Kawi
kaz Kazakh
kha Khasi
khm Khmer
khi Khoisan (Other)
kho Khotanese
kik Kikuyu
kin Kinyarwanda
kir Kirghiz
kon Kongo
kok Konkani
kor Korean
kpe Kpelle
kro Kru
kua Kuanyama
kur Kurdish
kru Kurukh
kus Kusaie
kut Kutenai
lad Ladino
lah Lahnda
lam Lamba
oci Langue d'oc (post 1500)
lao Lao
lap Lapp languages
lat Latin
lav Latvian
lin Lingala
lit Lithuanian
loz Lozi
lub Luba-Katanga
lui Luiseno
lun Lunda
luo Luo (Kenya and Tanzania)
mke Macedonian
mac/mke Macedonian
mad Madurese
mag Magahi
mai Maithili
mak Makasar
mlg Malagasy
msa Malay
may/msa Malay
mal Malayalam
mlt Maltese
man Mandingo
mni Manipuri
mno Manobo languages
max Manx
mri Maori
mri/mao Maori
mar Marathi
mah Marshall
mwr Marwari
mas Masai
myn Mayan languages
men Mende
mic Micmac
min Minangkabau
mis Miscellaneous (Other)
moh Mohawk
mol Moldavian
mkh Mon-Khmer (Other)
lol Mongo
mon Mongolian
mos Mossi
mul Multiple languages
mun Munda (Other)
nau Nauru
nav Navajo
nde Ndebele (Zimbabwe)
ndo Ndonga
nep Nepali
new Newari
nic Niger-Kordofanian (Other)
ssa Nilo-Saharan (Other)
niu Niuean
nai North American Indian (Other)
nso Northern Sohto
nor Norwegian
nub Nubian languages
nym Nyamwezi
nya Nyanja
nyn Nyankole
nyo Nyoro
nzi Nzima
oji Ojibwa
non Old Norse
peo Old Persian (ca. 600-400 B.C.)
ori Oriya
orm Oromo
osa Osage
oss Ossetic
oto Otomian languages
pal Pahlavi
pau Palauan
pli Pali
pam Pampanga
pag Pangasinan
pan Panjabi
pap Papiamento
paa Papuan-Australian (Other)
fas Persian
fas/per Persian
pol Polish
pon Ponape
por Portuguese
pra Prakrit languages
pro Provencal, Old (to 1500)
pus Pushto
que Quechua
roh Raeto-Romance
raj Rajasthani
rar Rarotongan
roa Romance (Other)
rum Romanian
ron/rum Romanian
rom Romany
run Rundi
rus Russian
sal Salishan languages
sam Samaritan Aramaic
smo Samoan
sad Sandawe
sag Sango
san Sanskrit
sco Scots
sel Selkup
sem Semitic (Other)
scr Serbo-Croatian
srr Serer
shn Shan
sna Shona
sid Sidamo
bla Siksika
snd Sindhi
sin Sinhalese
sit Sino-Tibetan (Other)
sio Siouan languages
sla Slavic (Other)
slk Slovak
slo/slk Slovak
slv Slovenian
sog Sogdian
som Somali
son Songhai
wen Sorbian languages
sot Sotho
sai South American Indian (Other)
esl Spanish
esl/spa Spanish
suk Sukuma
sux Sumerian
sun Sundanese
sus Susu
swa Swahili
ssw Swazi
sve Swedish
swe/sve Swedish
syr Syriac
tgl Tagalog
tah Tahitian
tgk Tajik
tam Tamil
tat Tatar
tel Telugu
ter Tereno
tha Thai
bod Tibetan
tib/bod Tibetan
tig Tigre
tir Tigrinya
tem Timne
tiv Tivi
tli Tlingit
ton Tonga (Tonga Islands)
tog Tonga (Nyasa)
tru Truk
tsi Tsimshian
tso Tsonga
tsn Tswana
tum Tumbuka
tur Turkish
ota Turkish, Ottoman
tuk Turkmen
twi Twi
uga Ugaritic
uig Uighur
ukr Ukrainian
umb Umbundu
und Undetermined
urd Urdu
uzb Uzbek
vai Vai
ven Venda
vie Vietnamese
vol Volapuk
vot Votic
wak Wakashan languages
wal Walamo
war Waray
was Washo
cym Welsh
cym/wel Welsh
wol Wolof
xho Xhosa
yao Yao
yap Yap
yid Yiddish
yor Yoruba
zap Zapotec
zen Zenaga
zha Zhuang
zul Zulu
zun Zuni
*/
/*
Codes from ISO 3166
Updated by the RIPE Network Coordination Centre, in coordination with
the ISO 3166 Maintenance Agency, Berlin
Country A 2 A 3 Number
----------------------------------------------------------------------
AFGHANISTAN AF AFG 004
ALBANIA AL ALB 008
ALGERIA DZ DZA 012
AMERICAN SAMOA AS ASM 016
ANDORRA AD AND 020
ANGOLA AO AGO 024
ANGUILLA AI AIA 660
ANTARCTICA AQ ATA 010
ANTIGUA AND BARBUDA AG ATG 028
ARGENTINA AR ARG 032
ARMENIA AM ARM 051
ARUBA AW ABW 533
AUSTRALIA AU AUS 036
AUSTRIA AT AUT 040
AZERBAIJAN AZ AZE 031
BAHAMAS BS BHS 044
BAHRAIN BH BHR 048
BANGLADESH BD BGD 050
BARBADOS BB BRB 052
BELARUS BY BLR 112
BELGIUM BE BEL 056
BELIZE BZ BLZ 084
BENIN BJ BEN 204
BERMUDA BM BMU 060
BHUTAN BT BTN 064
BOLIVIA BO BOL 068
BOSNIA AND HERZEGOWINA BA BIH 070
BOTSWANA BW BWA 072
BOUVET ISLAND BV BVT 074
BRAZIL BR BRA 076
BRITISH INDIAN OCEAN TERRITORY IO IOT 086
BRUNEI DARUSSALAM BN BRN 096
BULGARIA BG BGR 100
BURKINA FASO BF BFA 854
BURUNDI BI BDI 108
CAMBODIA KH KHM 116
CAMEROON CM CMR 120
CANADA CA CAN 124
CAPE VERDE CV CPV 132
CAYMAN ISLANDS KY CYM 136
CENTRAL AFRICAN REPUBLIC CF CAF 140
CHAD TD TCD 148
CHILE CL CHL 152
CHINA CN CHN 156
CHRISTMAS ISLAND CX CXR 162
COCOS (KEELING) ISLANDS CC CCK 166
COLOMBIA CO COL 170
COMOROS KM COM 174
CONGO CG COG 178
COOK ISLANDS CK COK 184
COSTA RICA CR CRI 188
COTE D'IVOIRE CI CIV 384
CROATIA (local name: Hrvatska) HR HRV 191
CUBA CU CUB 192
CYPRUS CY CYP 196
CZECH REPUBLIC CZ CZE 203
DENMARK DK DNK 208
DJIBOUTI DJ DJI 262
DOMINICA DM DMA 212
DOMINICAN REPUBLIC DO DOM 214
EAST TIMOR TP TMP 626
ECUADOR EC ECU 218
EGYPT EG EGY 818
EL SALVADOR SV SLV 222
EQUATORIAL GUINEA GQ GNQ 226
ERITREA ER ERI 232
ESTONIA EE EST 233
ETHIOPIA ET ETH 210
FALKLAND ISLANDS (MALVINAS) FK FLK 238
FAROE ISLANDS FO FRO 234
FIJI FJ FJI 242
FINLAND FI FIN 246
FRANCE FR FRA 250
FRANCE, METROPOLITAN FX FXX 249
FRENCH GUIANA GF GUF 254
FRENCH POLYNESIA PF PYF 258
FRENCH SOUTHERN TERRITORIES TF ATF 260
GABON GA GAB 266
GAMBIA GM GMB 270
GEORGIA GE GEO 268
GERMANY DE DEU 276
GHANA GH GHA 288
GIBRALTAR GI GIB 292
GREECE GR GRC 300
GREENLAND GL GRL 304
GRENADA GD GRD 308
GUADELOUPE GP GLP 312
GUAM GU GUM 316
GUATEMALA GT GTM 320
GUINEA GN GIN 324
GUINEA-BISSAU GW GNB 624
GUYANA GY GUY 328
HAITI HT HTI 332
HEARD AND MC DONALD ISLANDS HM HMD 334
HONDURAS HN HND 340
HONG KONG HK HKG 344
HUNGARY HU HUN 348
ICELAND IS ISL 352
INDIA IN IND 356
INDONESIA ID IDN 360
IRAN (ISLAMIC REPUBLIC OF) IR IRN 364
IRAQ IQ IRQ 368
IRELAND IE IRL 372
ISRAEL IL ISR 376
ITALY IT ITA 380
JAMAICA JM JAM 388
JAPAN JP JPN 392
JORDAN JO JOR 400
KAZAKHSTAN KZ KAZ 398
KENYA KE KEN 404
KIRIBATI KI KIR 296
KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF KP PRK 408
KOREA, REPUBLIC OF KR KOR 410
KUWAIT KW KWT 414
KYRGYZSTAN KG KGZ 417
LAO PEOPLE'S DEMOCRATIC REPUBLIC LA LAO 418
LATVIA LV LVA 428
LEBANON LB LBN 422
LESOTHO LS LSO 426
LIBERIA LR LBR 430
LIBYAN ARAB JAMAHIRIYA LY LBY 434
LIECHTENSTEIN LI LIE 438
LITHUANIA LT LTU 440
LUXEMBOURG LU LUX 442
MACAU MO MAC 446
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF MK MKD 807 (provis)
MADAGASCAR MG MDG 450
MALAWI MW MWI 454
MALAYSIA MY MYS 458
MALDIVES MV MDV 462
MALI ML MLI 466
MALTA MT MLT 470
MARSHALL ISLANDS MH MHL 584
MARTINIQUE MQ MTQ 474
MAURITANIA MR MRT 478
MAURITIUS MU MUS 480
MAYOTTE YT MYT 175
MEXICO MX MEX 484
MICRONESIA, FEDERATED STATES OF FM FSM 583
MOLDOVA, REPUBLIC OF MD MDA 498
MONACO MC MCO 492
MONGOLIA MN MNG 496
MONTSERRAT MS MSR 500
MOROCCO MA MAR 504
MOZAMBIQUE MZ MOZ 508
MYANMAR MM MMR 104
NAMIBIA NA NAM 516
NAURU NR NRU 520
NEPAL NP NPL 524
NETHERLANDS NL NLD 528
NETHERLANDS ANTILLES AN ANT 530
NEW CALEDONIA NC NCL 540
NEW ZEALAND NZ NZL 554
NICARAGUA NI NIC 558
NIGER NE NER 562
NIGERIA NG NGA 566
NIUE NU NIU 570
NORFOLK ISLAND NF NFK 574
NORTHERN MARIANA ISLANDS MP MNP 580
NORWAY NO NOR 578
OMAN OM OMN 512
PAKISTAN PK PAK 586
PALAU PW PLW 585
PANAMA PA PAN 591
PAPUA NEW GUINEA PG PNG 598
PARAGUAY PY PRY 600
PERU PE PER 604
PHILIPPINES PH PHL 608
PITCAIRN PN PCN 612
POLAND PL POL 616
PORTUGAL PT PRT 620
PUERTO RICO PR PRI 630
QATAR QA QAT 634
REUNION RE REU 638
ROMANIA RO ROM 642
RUSSIAN FEDERATION RU RUS 643
RWANDA RW RWA 646
SAINT KITTS AND NEVIS KN KNA 659
SAINT LUCIA LC LCA 662
SAINT VINCENT AND THE GRENADINES VC VCT 670
SAMOA WS WSM 882
SAN MARINO SM SMR 674
SAO TOME AND PRINCIPE ST STP 678
SAUDI ARABIA SA SAU 682
SENEGAL SN SEN 686
SEYCHELLES SC SYC 690
SIERRA LEONE SL SLE 694
SINGAPORE SG SGP 702
SLOVAKIA (Slovak Republic) SK SVK 703
SLOVENIA SI SVN 705
SOLOMON ISLANDS SB SLB 090
SOMALIA SO SOM 706
SOUTH AFRICA ZA ZAF 710
SPAIN ES ESP 724
SRI LANKA LK LKA 144
ST. HELENA SH SHN 654
ST. PIERRE AND MIQUELON PM SPM 666
SUDAN SD SDN 736
SURINAME SR SUR 740
SVALBARD AND JAN MAYEN ISLANDS SJ SJM 744
SWAZILAND SZ SWZ 748
SWEDEN SE SWE 752
SWITZERLAND CH CHE 756
SYRIAN ARAB REPUBLIC SY SYR 760
TAIWAN, PROVINCE OF CHINA TW TWN 158
TAJIKISTAN TJ TJK 762
TANZANIA, UNITED REPUBLIC OF TZ TZA 834
THAILAND TH THA 764
TOGO TG TGO 768
TOKELAU TK TKL 772
TONGA TO TON 776
TRINIDAD AND TOBAGO TT TTO 780
TUNISIA TN TUN 788
TURKEY TR TUR 792
TURKMENISTAN TM TKM 795
TURKS AND CAICOS ISLANDS TC TCA 796
TUVALU TV TUV 798
UGANDA UG UGA 800
UKRAINE UA UKR 804
UNITED ARAB EMIRATES AE ARE 784
UNITED KINGDOM GB GBR 826
UNITED STATES US USA 840
UNITED STATES MINOR OUTLYING ISLANDS UM UMI 581
URUGUAY UY URY 858
UZBEKISTAN UZ UZB 860
VANUATU VU VUT 548
VATICAN CITY STATE (HOLY SEE) VA VAT 336
VENEZUELA VE VEN 862
VIET NAM VN VNM 704
VIRGIN ISLANDS (BRITISH) VG VGB 092
VIRGIN ISLANDS (U.S.) VI VIR 850
WALLIS AND FUTUNA ISLANDS WF WLF 876
WESTERN SAHARA EH ESH 732
YEMEN YE YEM 887
YUGOSLAVIA YU YUG 891
ZAIRE ZR ZAR 180
ZAMBIA ZM ZMB 894
ZIMBABWE ZW ZWE 716
*/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __TEXTCOMMON__ */